package com.neusoft.yiyang.bed;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.cloud.context.config.annotation.RefreshScope;

/**
 * 床位服务启动类
 * 该类启动了Spring Boot应用，注册到Nacos，并开启服务发现。
 */
@SpringBootApplication
@EnableDiscoveryClient  // 启用服务注册与发现
@EnableFeignClients(basePackages = "com.neusoft.yiyang.bed.client")
@ComponentScan(basePackages = "com.neusoft.yiyang")  // 扫描项目包
@MapperScan("com.neusoft.yiyang.bed.mapper")  // 添加扫描的 Mapper 包路径
@RefreshScope  // 支持配置的动态刷新
public class BedServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(BedServiceApplication.class, args);
    }
}
